package com.qfedu.mall.mapper;


import com.qfedu.mall.beans.entity.ShoppingCart;
import com.qfedu.mall.beans.vo.ShoppingCartVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.MySqlMapper;

import java.util.List;

@Repository
public interface ShoppingCartMapper extends Mapper<ShoppingCart>, MySqlMapper<ShoppingCart> {
    List<ShoppingCartVO> selectShopcartByUserId(int userId);

    int updateCartnumByCartid(@Param("cartId") int cartId,
                              @Param("cartNum") int cartNum);

    List<ShoppingCartVO> selectShopcartByCids(@Param("cids") List<Integer> cids);
}